package com.phb.puhuibao.job;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class jobInvalid {
	
	@Resource(name = "jdbcTemplate")
	private JdbcTemplate jdbcTemplate;

	@Scheduled(cron="0 0 0 * * *")  
    public void process() {
		 String sql="";
		 sql = "UPDATE phb_muser_job_release b SET b.`status`=0  WHERE b.job_end_date<NOW()";
		 this.jdbcTemplate.queryForList(sql);
	}

}
